include('conf.php');
// query per referenza
$sql2 = "SELECT * FROM contents WHERE id = '$_GET[id]' order by ordine ASC";
$res2 = mysql_query($sql2);
$row2 = mysql_fetch_array($res2);
?>
// query per news
$sql1 = "SELECT * FROM contents WHERE id_tipo = '3' and lang ='".$_SESSION["LANG"]."' and stato='1' order by ordine ASC";
$res1 = mysql_query($sql1);
while ($row1 = mysql_fetch_assoc($res1)) {
$sqlIMG = "SELECT * FROM images WHERE id_rif = '".$row1["id"]."' order by ordine ASC";
$rsIMG = mysql_query($sqlIMG);
$rowIMG = mysql_fetch_array($rsIMG);
$data = $row1["data_news"];
$anno = substr($data, 0,4);
$mese = substr($data, 5,2);
$giorno = substr($data, 8,2);
$row1["data_news"] = $giorno . ".".$mese .".".$anno;
?>